<template>
  <div class="swiper-container" :class='swiperclass'>
    <div class="swiper-wrapper">
        <slot></slot>
    </div>
  </div>
</template>

<script>
import Swiper from 'swiper/bundle'
import 'swiper/swiper-bundle.min.css'
export default {
  name: '',
  props: {
    perslide: {
      type: Number,
      defalut: 1
    },
    swiperclass: {
      type: String,
      defalut: 'swiper-container'
    }
  },
  data () {
    return {
    }
  },

  methods: {},
  mounted () {
    new Swiper('.' + this.swiperclass, {
      slidesPerView: this.perslide,
      spaceBetween: 15,
      freeMode: true
    })
  }
}

</script>
<style scoped lang='less'>
.swiper-wrapper{
  img{
    width: 100%;
  }
}
</style>
